#pragma once

class Material{
protected:
	static GLuint loadShader(GLenum shaderType, const char* pSource);
	static void checkGlError(const char* op);
	static GLuint createProgram(const char* pVertexSource, const char* pFragmentSource);

	static GLuint cur_program;
	static void use_program(const GLuint& program);

	static const void* cur_buffer;
	static bool set_buffer(const void* buffer);
public:
	Material();
	virtual ~Material();
	virtual void initialize_once() = 0;
	virtual void initialize_common() = 0;
	virtual void initialize_specific(const GLfloat* buffer) = 0;
	virtual void update(const float& time) = 0;
	virtual GLuint get_vertex_stride() const = 0;
};
